
import os
import tempfile

path=os.path.dirname(__file__)+'/'

print(path)  # /home/hashaki/下载/vnpy_crypto/examples/

file=path+'balabala.txt'

fd,hashaki=tempfile.mkstemp(suffix='.txt',text=True)
try:
    os.close(fd)
    print(hashaki)
finally:
    os.unlink(hashaki) # /tmp/tmp_72b290l.txt